\(\int \frac {\csc (x)}{-\cot (x)+\csc (x)} \, dx\) [214]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 12 \[ \int \frac {\csc (x)}{-\cot (x)+\csc (x)} \, dx=-\frac {\sin (x)}{1-\cos (x)} \]

[Out]

-sin(x)/(1-cos(x))

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3245, 2727} \[ \int \frac {\csc (x)}{-\cot (x)+\csc (x)} \, dx=-\frac {\sin (x)}{1-\cos (x)} \]

[In]

Int[Csc[x]/(-Cot[x] + Csc[x]),x]

[Out]

-(Sin[x]/(1 - Cos[x]))

Rule 2727

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[-Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 3245

Int[csc[(d_.) + (e_.)*(x_)]^(n_.)*((a_.) + csc[(d_.) + (e_.)*(x_)]*(b_.) + cot[(d_.) + (e_.)*(x_)]*(c_.))^(m_)
, x_Symbol] :> Int[1/(b + a*Sin[d + e*x] + c*Cos[d + e*x])^n, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[m + n, 0]
 && IntegerQ[n]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{1-\cos (x)} \, dx \\ & = -\frac {\sin (x)}{1-\cos (x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.67 \[ \int \frac {\csc (x)}{-\cot (x)+\csc (x)} \, dx=-\cot \left (\frac {x}{2}\right ) \]

[In]

Integrate[Csc[x]/(-Cot[x] + Csc[x]),x]

[Out]

-Cot[x/2]

Maple [A] (verified)

Time = 0.20 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.75

method result size
default \(-\frac {1}{\tan \left (\frac {x}{2}\right )}\) \(9\)
risch \(-\frac {2 i}{{\mathrm e}^{i x}-1}\) \(13\)

[In]

int(csc(x)/(csc(x)-cot(x)),x,method=_RETURNVERBOSE)

[Out]

-1/tan(1/2*x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.83 \[ \int \frac {\csc (x)}{-\cot (x)+\csc (x)} \, dx=-\frac {\cos \left (x\right ) + 1}{\sin \left (x\right )} \]

[In]

integrate(csc(x)/(-cot(x)+csc(x)),x, algorithm="fricas")

[Out]

-(cos(x) + 1)/sin(x)

Sympy [F]

\[ \int \frac {\csc (x)}{-\cot (x)+\csc (x)} \, dx=- \int \frac {\csc {\left (x \right )}}{\cot {\left (x \right )} - \csc {\left (x \right )}}\, dx \]

[In]

integrate(csc(x)/(-cot(x)+csc(x)),x)

[Out]

-Integral(csc(x)/(cot(x) - csc(x)), x)

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.83 \[ \int \frac {\csc (x)}{-\cot (x)+\csc (x)} \, dx=-\frac {\cos \left (x\right ) + 1}{\sin \left (x\right )} \]

[In]

integrate(csc(x)/(-cot(x)+csc(x)),x, algorithm="maxima")

[Out]

-(cos(x) + 1)/sin(x)

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.67 \[ \int \frac {\csc (x)}{-\cot (x)+\csc (x)} \, dx=-\frac {1}{\tan \left (\frac {1}{2} \, x\right )} \]

[In]

integrate(csc(x)/(-cot(x)+csc(x)),x, algorithm="giac")

[Out]

-1/tan(1/2*x)

Mupad [B] (verification not implemented)

Time = 22.68 (sec) , antiderivative size = 6, normalized size of antiderivative = 0.50 \[ \int \frac {\csc (x)}{-\cot (x)+\csc (x)} \, dx=-\mathrm {cot}\left (\frac {x}{2}\right ) \]

[In]

int(-1/(sin(x)*(cot(x) - 1/sin(x))),x)

[Out]

-cot(x/2)